<template>
   <div>
       <div class="title">
           <div @click="back()" v-if="isShowBack" class="backImg">
              
           </div>
           {{title}}
       </div>
       <div class="local"></div>
   </div>
</template>

<script>
    export default {
        name: "headerNav",
        props:{
            title:String,
            isShowBack: {
                type:Boolean ,
                default:false
            },
        },
        methods:{
            back(){
                this.$router.back()
            },
        }
    }
</script>

<style scoped>
 .title{
        position: fixed;
        left: 0;
        right: 0;
        height: 44px;
        display: flex;
        justify-content: center;
        align-items: center;
        color: #ffffff;
        z-index: 88;
        font-size: 19px;
        background:lightsalmon;
    }
 .backImg{
     width: 40px;
     height: 40px;
     line-height: 40px;
     position: absolute;
     left: 15px;
     font-size: 22px;
 }
    .local{
        height: 44px;
    }
</style>